package Storage;

import static org.junit.Assert.*;

import java.text.ParseException;

import org.junit.Before;
import org.junit.Test;

import Object.DSException;
import Task.DSTask;
import Task.DSTaskList;

public class DSDataFileHandlerTest {

	@Before
	public void setUp() throws Exception {
	}

	@Test
	public void testSaveToFile() throws ParseException, DSException {
		DSTaskList list = new DSTaskList();
		for(int i=0; i<5; i++){
			DSTask task = new DSTask();
			task.setTaskName("name"+i);
			task.setTaskStartTime(123+i);
			task.setTaskEndTime(456+i);
			list.add(task);
		}
		
		DSDataFileHandler file = DSDataFileHandler.getInstance();
		file.saveToDataFile(list);
	}

}
